﻿@using Covenant.Models.Grunts
@model IEnumerable<EmbeddedResource>

<div class="table-responsive">
    <table id="resource-table" class="table table-hover">
        <thead>
            <tr>
                <th>@Html.DisplayNameFor(model => model.Name)</th>
                <th>@Html.DisplayNameFor(model => model.Location)</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        <a asp-controller="EmbeddedResource" asp-action="Edit" asp-route-id="@item.Id">
                            @Html.DisplayFor(modelItem => item.Name)
                        </a>
                    </td>
                    <td>@Html.DisplayFor(modelItem => item.Location)</td>
                </tr>
            }
        </tbody>
    </table>
</div>
<a asp-controller="EmbeddedResource" asp-action="Create" class="btn btn-primary">
    <span data-feather="plus"></span>
    Create
</a>